﻿using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "Question")]
    public class QuestionInfo:IDetach
    {
        public QuestionInfo()
        {
            Detach();
        }
        #region Model
        private int _id;
        private string _question = "";
        private DateTime _questiontime = DateTime.Now;
        private int _askerid = 0;
        private string _askername = "";
        private string _answer = "";
        private DateTime _answertime = DateTime.Now;
        private int _answerid = 0;
        private string _answername = "";
        private bool _iscommon = false;
        private bool _isanswered = false;
        private int _hits = 0;
        /// <summary>
        /// 
        /// </summary>
        [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Question
        {
            set { _question = value; }
            get { return _question; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public DateTime QuestionTime
        {
            set { _questiontime = value; }
            get { return _questiontime; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int AskerId
        {
            set { _askerid = value; }
            get { return _askerid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string AskerName
        {
            set { _askername = value; }
            get { return _askername; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Answer
        {
            set { _answer = value; }
            get { return _answer; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public DateTime AnswerTime
        {
            set { _answertime = value; }
            get { return _answertime; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int AnswerId
        {
            set { _answerid = value; }
            get { return _answerid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string AnswerName
        {
            set { _answername = value; }
            get { return _answername; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public bool IsCommon
        {
            set { _iscommon = value; }
            get { return _iscommon; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public bool IsAnswered
        {
            set { _isanswered = value; }
            get { return _isanswered; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int Hits
        {
            set { _hits = value; }
            get { return _hits; }
        }
        #endregion Model

        public void Detach()
        {
            
        }
    }
}
